//
//  UserInfoTool.m
//  customer
//
//  Created by Holothurian on 2018/10/20.
//  Copyright © 2018年 yinlong. All rights reserved.
//

#import "UserInfoTool.h"

@implementation UserInfoTool

//请求超时 提示
NSString * const CustomerPoolNetStr = @"请求超时，请检查网络！";
//RSA 私钥
NSString * const CustomerRsaPublicKey = @"-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC4L/7MhR99+yswtvSr0dKenD/oJUaow2AEJ6OYn2n12Y4H9RIQY2W5Sr/h4iwMzQTpWFNT5y7jjpGY+qYNQOR1GS6bG2GuTMK9W1BwC41y2gd0xwqWV+df2+S9eHqxqOdib/4/+t2JYxLTJvAC5pGPEvt3z8RXmO8mvtlVzBLaZQIDAQAB\n-----END PUBLIC KEY-----";

/*
 MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC4L/7MhR99+yswtvSr0dKenD/oJUaow2AEJ6OYn2n12Y4H9RIQY2W5Sr/h4iwMzQTpWFNT5y7jjpGY+qYNQOR1GS6bG2GuTMK9W1BwC41y2gd0xwqWV+df2+S9eHqxqOdib/4/+t2JYxLTJvAC5pGPEvt3z8RXmO8mvtlVzBLaZQIDAQAB
 */

//用户账号 member_account
NSString * const CustomerUserAccount = @"member_account";
//用户id
NSString * const CustomerUserID = @"member_id";
//用户标记
NSString * const CustomerUserToken = @"member_token";
//用户手机号
NSString * const Customer_member_phone = @"member_phone";
//用户头像
NSString * const Customer_member_img = @"member_img";
//真实姓名
NSString * const Customer_member_real_name = @"member_real_name";
//订单量
NSString * const Customer_order_count = @"order_count";
//是否同意用户协议
NSString * const Customer_Agreement = @"customer_Agreement";
//微信唯一识别标志
NSString *const Customer_WXAppOpen_id = @"weixin_app_open_id";

//极光推送
NSString * const Jpush_AppKey = @"fa3b2aa680d876ab102e2b48";

NSString * const JPush_ID = @"WhatYourRegistationID";

@end

@implementation NSString(UserInfoString)

+(BOOL)userInfoEmpty{
    
    if (k_Is_Empty(K_UserDefault_Read(CustomerUserID))||k_Is_Empty(K_UserDefault_Read(CustomerUserToken))||k_Is_Empty(K_UserDefault_Read(CustomerUserAccount))) {
        return YES;
    }
    return NO;
}

+(void)removeUserInfo{
    K_UserDefault_Remove(CustomerUserAccount);
    K_UserDefault_Remove(CustomerUserID);
    K_UserDefault_Remove(CustomerUserToken);
    K_UserDefault_Remove(Customer_member_phone);
    K_UserDefault_Remove(Customer_member_img);
    K_UserDefault_Remove(Customer_member_real_name);
    K_UserDefault_Remove(Customer_order_count);
    K_UserDefault_Remove(Customer_WXAppOpen_id);
}

+(NSString *)emptyStr:(NSString *)string{
    
    return k_Is_Empty(string)?@"":string;
    
}

@end

